<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
	<script src="<?php echo base_url()?>themes/default/js/jquery.area.js"></script>
		<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>

			<ul class="breadcrumb">
				<li>
					<i class="icon-home home-icon"></i>
					<a href="#">系统首页</a>
				</li>
				<li class="active">
					基础数据管理
				</li>
	            <li>
					<a href="#">设备类型</a>
				</li>
				<li>
					<a href="#">价格详细</a>
				</li>
	            <li class="active">
					编辑
				</li>
			</ul><!-- .breadcrumb -->
		</div>
		<div class="page-content">
        
        <div class="page-header">
			<h1>设备价格详细新增</h1>
		</div>
		<div class="row">
			 <div class="col-xs-12">
				<!-- PAGE CONTENT BEGINS -->

				<form id="usrform" action="<?php echo base_url()."admin/basis_data/edit_detailed_price"?>" method="post">
				    <div class="box-body" style="display: inline-block;width: 100%">
					<?php
						if(!empty($result) && count($result)>0){
							foreach($result as $val){
					?>
                        <div class="form-group col-xs-12">
				            <label>城市名称：</label><span style="color: #a94442;"><?php echo form_error("city_id")?></span>
				            <select name="city_id" class="form-control" check-type="required">
                            <option value="">全部</option>
                            <?php if (isset($open_city)){
                                foreach ($open_city as $val_one){
                            ?>
								<option value="<?php echo $val_one->city_id;?>" <?php if ($val->city_id == $val_one->city_id)echo "selected";?>><?php echo $val_one->city_name;?></option>
							<?php }
                                }?>
						    </select>
			            </div>
			            <div class="form-group col-xs-6">
				            <label>日租：</label>
				            <input name="day_price" type="text" class="form-control" placeholder="输入 ..." value="<?php echo $val->day_price;?>" check-type="required">
			            </div>
			            <div class="form-group col-xs-6">
				            <label>月租：</label>
				            <input name="month_price" type="text" class="form-control" placeholder="输入 ..." value="<?php echo $val->month_price;?>" check-type="required">
			            </div>
			            <div class="form-group col-xs-6">
				            <label>起步标准(小时\公里)：</label>
				            <input name="start_standard" type="text" class="form-control" placeholder="输入 ..." value="<?php echo $val->start_standard;?>" check-type="required">
			            </div>
			            <div class="form-group col-xs-6">
				            <label>起步价：</label>
				            <input name="start_price" type="text" class="form-control" placeholder="输入 ..." value="<?php echo $val->start_price;?>" check-type="required">
			            </div>
			            <div class="form-group col-xs-6">
				            <label>超里程费(小时\公里)：</label>
				            <input name="out_price" type="text" class="form-control" placeholder="输入 ..." value="<?php echo $val->out_price;?>" check-type="required">
			            </div>
			            <div class="form-group col-xs-6">
				            <label>折扣：</label>
				            <input name="day_discount" type="text" class="form-control" placeholder="输入 ..." value="<?php echo $val->day_discount;?>" check-type="required">
			            </div>
			            <div class="form-group col-xs-6">
                            <label>收费标准：</label>
                            <textarea class="form-control" style="height:60px" name="desc"><?php echo $val->desc;?></textarea>
                       </div>
                       <?php
                       }}
                       	?>
                        </div>
			            <div class="clearfix form-actions">
			            	<input name="id" style="display: none;" value="<?php echo $val->id ?>" />
			            	<input name="type_id" style="display: none;" value="<?php echo $type_id ?>" />
						<div class="col-md-offset-3 col-md-9">
							<button id="btnSubmit" class="btn btn-info" type="submit">
								<i class="icon-ok bigger-110"></i>
								保存
							</button>

							&nbsp; &nbsp; &nbsp;
							<a class="btn" href="<?php echo base_url()."admin/basis_data/detailed_price/".$type_id?>">
								<i class="icon-undo bigger-110"></i>
								返回
							</a>
						</div>
					</div>
				</form>
			</div>
		</div><!-- /.row -->
	</div><!-- /.page-content -->
</div><!-- /.main-content -->
	<script type="text/javascript">
	$("#usrform").validation();
	//保存
	$("#btnSubmit").on('click',function(event){
	  // 2.最后要调用 valid()方法。
	  if ($("#usrform").valid()==false){
	    return false;
	  }
	});
	</script>